import request from '@/utils/request'

const api_name = `/platformapi/order/orderInfo`

export default {
  submitOrder(scheduleId, patientId) {
    return request({
      url: `${api_name}/auth/submitOrder/${scheduleId}/${patientId}`,
      method: 'post'
    })
  },
  /*
  id
   */

  getPageList(page, limit, searchObj) {
    return request({
      url: `${api_name}/auth/${page}/${limit}`,
      method: 'post',
      params: searchObj
    })
  },
  /*
  searchObj:
     patientId
     orderStatus
   */

  getStatusList() {
    return request({
      url: `${api_name}/auth/getStatusList`,
      method: 'post'
    })
  },
  /*
  返回所有数据，就是查询所有
   */

  getOrderInfo(orderId) {
    return request({
      url: `${api_name}/auth/getOrderInfo/${orderId}`,
      method: 'post'
    })
  },

  cancelOrder(orderId) {
    return request({
      url: `${api_name}/auth/cancelOrder/${orderId}`,
      method: 'post'
    })
  }
  /*
  根据id删除
   */
}
